package com.zhouyer.edu.utils;

import com.alibaba.druid.pool.DruidDataSource;

/**
 * Druid连接池单例工具类
 */
public class DruidUtils {
    private DruidUtils() {
    }

    private static DruidDataSource druidDataSource = new DruidDataSource();

    static {
        druidDataSource.setDriverClassName("com.mysql.jdbc.Driver");
        druidDataSource.setUrl("jdbc:mysql://localhost:3306/lagou_study");
        druidDataSource.setUsername("root");
        druidDataSource.setPassword("123456");
    }

    public static DruidDataSource getInstance() {
        return druidDataSource;
    }
}
